LearningSession.Suspend Method

Temporarily suspends the the current session. It may be resumed at a later time.

Parent Type: LearningSession

Namespace: Microsoft.LearningComponents

Assembly: Microsoft.LearningComponents.dll

Syntax
C#

public virtual void Suspend ()

Exceptions
Exception type Condition
InvalidOperationException

Thrown if the session is not in the appropriate state to be suspended. Use IsSuspendValid to anticipate if this exception will be thrown.

Remarks

This method does not save changes that result from suspending the session. The application should call CommitChanges after this method and prior to disposing the object to ensure changes are persisted.

It may not be valid to call this method based on the state of the session. Call IsSuspendValid before calling this method to determine if this method is likely to succeed.